package omega

import (
	"reflect"
	"runtime"
	"time"

	"github.com/google/uuid"
)

func getTimestamp() int64 {
	return time.Now().UnixNano() / int64(time.Millisecond)
}

func getFnName(fn interface{}) string {
	compensateFunc := reflect.ValueOf(fn)
	fnName := runtime.FuncForPC(compensateFunc.Pointer()).Name()
	return fnName
}

func getUuid() string {
	return uuid.Must(uuid.NewUUID()).String()
}
